package com.example.thealarm;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class AlarmReminderHelper extends SQLiteOpenHelper {
    private static final String DATABASE_NAME="alarmreminder.db";
    public static final int DATABASE_VERSION=1;
    Context context;
    public AlarmReminderHelper(Context context){
        super(context,DATABASE_NAME,null,DATABASE_VERSION);
        this.context =context;
    }
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        String SQL_CREATE_TABLE = "CREATE TABLE " + TheDataBase.DataBaseEntry.TABLE_NAME+ " ("
                + TheDataBase.DataBaseEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + TheDataBase.DataBaseEntry.KEY_TITLE + " TEXT NOT NULL, "
                + TheDataBase.DataBaseEntry.KEY_DATE +" TEXT NOT NULL, "
                + TheDataBase.DataBaseEntry.KEY_TIME +" TEXT NOT NULL, "
                + TheDataBase.DataBaseEntry.KEY_REPEAT +" TEXT NOT NULL, "
                + TheDataBase.DataBaseEntry.KEY_REPEAT_NO +" TEXT NOT NULL, "
                + TheDataBase.DataBaseEntry.KEY_REPEAT_TYPE +" TEXT NOT NULL, "
                + TheDataBase.DataBaseEntry.KEY_ACTIVE +" TEXT NOT NULL " + ");";
        sqLiteDatabase.execSQL(SQL_CREATE_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
